package com.example.provider;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class MyHelper extends SQLiteOpenHelper{
	public static final String DB_NAME = "my.db";
	public static final int DB_VERSION = 1;

	public MyHelper(Context context){
		super(context, DB_NAME, null, DB_VERSION);
	}
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "create table if not exists student" +
				"(_id integer primary key autoincrement,name text,age int)";
		db.execSQL(sql);
		String sql1 = "create table if not exists teacher" +
		"(_id integer primary key autoincrement,name text,age int)";
		db.execSQL(sql1);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		
	}

}
